/*
  class for copmutation of stream function of 2D velocity field
*/
#include "fem/stateproblem.h"
#include "fem/output.h"
#include "integration/quadrature.h"



class C3DToFProblem;

class C3DFlowProblem : public CStateProblem
{
 public:
	C3DFlowProblem();

	void calculateToF();

 protected:

	virtual void afterReadConfig(const Json::Value &input_obj);

	C3DToFProblem *SFP;

};


class C3DToFProblem : public CStateProblem
{
 private:
  int v_type;
  IntPoint<3> *vip3d;
  IntPoint<2> *vip2d;
  IntPoint<1> *vip1d;
  CVec *vq;
  CVar vx, vy, vz;

 public:
  C3DToFProblem();
  void afterLoadMesh();
  void afterEvaluateVolumeComponents(int elem, int qp);
  void setVelocity(int type, CVec *_vq, IntPoint<3> *ip3d, IntPoint<2> *ip2d, IntPoint<1> *ip1d);
  void setMesh(Mesh *m, SaveCells cells);
  bool useVolumeIntegral() { return true; };
  bool useFaceIntegral() { return false; };
  bool useEdgeIntegral() { return false; };
  CVar volumeIntegral(int comp, int elem, int qp);
  
  friend class C3DFlowProblem;
};








